import { createApp } from 'vue'
import './style.css'
import App from './App.vue'

import router from './router'
import pinia from './store'
// 注册ElementPlus
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import 'element-plus/dist/index.css'


// 注册全局组件
import HeaderView from '@/views/layout/HeaderView.vue'
import FooterView from '@/views/layout/FooterView.vue'

const app = createApp(App)
app.use(router)
app.use(pinia)
app.use(ElementPlus)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {  //遍历ElementPlusIconsVue对象
    app.component(key, component);
}

// 注册全局组件
app.component('HeaderView', HeaderView)
app.component('FooterView', FooterView)
app.mount('#app')
